package com.demo.util;

import java.util.HashMap;
import java.util.Map;

public class MapUtil {
    static Map<String,Object> map = new HashMap<String,Object>();
    public static Map<String, Object> ok(){
        map.put("code", 200);
        map.put("msg", "成功");
        return map;
    }

    public static Map<String,Object> ok(Object data){
        map.put("code", 200);
        map.put("msg", "成功");
        map.put("data", data);
        return map;
    }

    public static Map<String,Object> fail(Integer code,String msg){
        map.put("code",code);
        map.put("msg", msg);
        return map;
    }
}